package com.zhb.core.utils;

import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class AjaxUtils {
	public static boolean isAjax(HttpServletRequest httpRequest) {
		String requestType = httpRequest.getHeader("X-Requested-With");
		if ("XMLHttpRequest".equals(requestType)) {
			return true;
		}
		return false;
	}

	public static void sendJson(HttpServletResponse httpResponse,
			Object jsonString) {
		
	}

	public static void issueRedirect(ServletRequest request,
			ServletResponse response, String unauthorizedUrl) {
		
	}

	public static HttpServletResponse toHttp(ServletResponse response) {
		return null;
	}

}
